Elsewhere

Tyler Frankenstein: Headless Drupal Web App with Angular JS and DrupalGap

Planet Drupal - Sat, 18/07/2015 - 22:20

In this tutorial (for NYC CAMP 2015) we'll explore how to use Drupal 7 and DrupalGap 2 (powered by Angular JS) to build a decoupled ("headless") web application for Drupal. In a nutshell, here is what the app will do:

  1. A user runs the app in their browser
  2. The browser asks the user for access to their current location
  3. The app passes their location to Drupal
  4. Drupal will return nearby content (if any) to the app
  5. The app will display the locations on a map and let the user click on them to see more details

Ready? Let's rock and roll, no time to fiddle...

Categories: Elsewhere

Niels Thykier: Performance tuning of lintian

Planet Debian - Sat, 18/07/2015 - 15:01

For quite a while, Lintian has been able to create performance logs (--perf-debug --perf-output perf.log) that help diagnose where lintian spends most of its runtime.  I decided to make lintian output these logs on lintian.debian.org to help us spot performance issues, though I have not been very good at analysing them regularly.

At the beginning of the month, I finally got around to look a bit into one of them.  My findings on IRC triggered Mattia Rizzolo to create this following graph.  It shows the accumulated runtime of each check/collection measured in seconds.  Find these findings, we set out to solve some of the issues.  This lead to the following changes in 2.5.33 (in no particular order):

  • Increased buffer size in check/cruft.pm to reduce overhead [bc8b3e5] (S)
  • Reduced overhead in strings(1) extraction [b058fef] (P)
  • Reduced overhead in spell-checking [b824170] (S)
    • Also improves the performance of spellintian!
  • Removed a high overhead check that did not work [2c7b922] (P)

Legend: S: run single threaded (1:1 performance improvement).  P: run in parallel.

Overall, I doubt the changes will give a revolutionary change in speed, but it should improve the 3rd, 4th and 5th slowest parts in Lintian.

Beyond runtime performance, we got a few memory optimisations in the pipeline for Lintian 2.5.34:

  • Remove member from “non-dir” nodes in the Lintian path graph (2%) [6365635]
  • Remove two fields at the price of computing them as needed (~5%) [a696197 + 8dacc8e]
  • Merge 4 fields into 1 (~8%) [5d49cd2 + fb074e4]
  • Share some memory between package-based caches (18%) [ffc7174]

Combined these 6 commits reduce memory consumption in caches by ~33% compared to 2.5.33, when lintian processes itself.  In absolute numbers, we are talking about a drop from 12.53MB to 8.48MB.  The mileages can certainly vary depending on the package (mscgen “only” saw an ~25% improvement).  Nevertheless, I was happy to list #715035 as being closed in 2.5.34. :)


Filed under: Debian, Lintian
Categories: Elsewhere

John Goerzen: True Things About Learning to Fly

Planet Debian - Sat, 18/07/2015 - 04:40

I’ve been pretty quiet for the last few months because I’m learning to fly. I want to start with a few quotes about aviation. I have heard things like these from many people and can vouch for their accuracy:

Anyone can learn to fly.

Learning to fly is one of the hardest things you’ll ever do.

It is totally worth it. Being a pilot will give you a new outlook on life.

You’ll be amazed at what radios do a 3000ft. Have you ever had an 3000-foot antenna tower?

The world is glorious at 1000ft up.

Share your enthusiasm with those around you. You have a perspective very few ever see, except for a few seconds on the way to 35,000ft.

Earlier this month, I flew solo for the first time — the biggest milestone on the way to getting the pilot’s license. Here’s a photo my flight instructor took as I was coming in to land that day.

Today I took my first flight to another airport. It wasn’t far — about 20 miles away — but it was still a thrill. I flew about 1500ft above the ground, roughly above a freeway that happened to be my route. From that height, things still look three-dimensional. The grain elevator that marked out the one small town, the manufacturing plant at another, the college at the third. Bales of hay dotting the fields, the occasional tractor creeping along a road, churches sticking up above the trees. These are places I’ve known for decades, and now, suddenly, they are all new.

What a time to be alive! I am glad that our world is still so full of wonder and beauty.

Categories: Elsewhere

Wuinfo: Test Driven Coding Style

Planet Drupal - Sat, 18/07/2015 - 03:11

Like Chinese philosophy Yin and Yang, Coding and testing support each other. Here I want to introduce a method to increase the rate of software project success. It is a critical thinking in programming, an agile methodology on a micro-scale level. What is it? In every line of code, every loop or conditional block, we look for multiple solutions. For each solution, we evaluate possibilities of going wrong. Pick the most reliable one. It helps us remove most of code vulnerability at beginning.

Knowing how to test is more important than knowing how to coding. A good function is stable, fast and, requires less memory and computing resources. It is not necessary to be complicated or has difficult API functions under the hood. Usually, it has less code and seems to be simpler than the rest. And it is the result of various tests and trying different methods. We choose the best way to compose the code base on various tests. It ensures robust software system with less vulnerability.

Let us say there is a project that send human beings to the Mars. If we are part of the project and our responsibility is to land the spaceship on the surface of the planet safely. How to make sure 'Landing Function' work without any deadly 'bug'? To us, what is the most important thing for it? It is not the landing gear; it is not the parachute. It is the tests. Under different situations, we performing hundreds or thousands of tests to validate each equipment. Find those thousands testing cases is the most difficult and important task. We need to find as close condition as possible under which when landing the spaceship on the Mars. The temperature, the speed of the spaceship, the chemical in the air, etc. Test materials under all sorts of combined circumstances. Any possibility that can go wrong, we will let it fail in the test.

When we solve a problem or fix bugs, we do the same thing. We do some research. By doing some research, we guess the cause of a problem. Then, we try to prove it with many tests. If the test results are positive, then, we came to a conclusion. Otherwise, we continue guesses and tests. Insufficient tests may lead us to a wrong conclusion.

Again, the tricky thing is how we test it. It is same when building new functions or modules. Whenever there is a solution, we put it under different conditions and validate it. We cover it with enough test cases. Like Chinese philosophy Yin and Yang, Coding and validating support each other.

When building a complex function, we may divide it into many baby steps. Each step is important to the overall success. Exhaust the ways testing each step to make sure each one is good. The result of the previous step can safely serve the next step. Finding a good way to test each step is crucial. Because there are many ways to do a thing. We need to choose the best one with tests. To each baby step, there can be a dozen ways to take. Able to find the most reliable way is a merit of a good software developer or a project leader. When pushes code to production, it can be way more complicated and possible to break. As laws of Murphy, anything that can go wrong will go wrong. So, have multiple test scenarios prepared for the smallest function unit. It is essential to make our code safe and sound. We will never overestimate the importance of it.

When it comes to a complex function, dividing it into small functional units that are easy to verify. Let's say the CYouTube project. We divide it into multiple steps and sub-steps. Each step has an easy and clear goal to achieve.

  • Pull JSON data from YouTube
  • Create Drupal queue task for each item
  • Create a file entity of video for each task
  • Each of those major Steps has multiple sub-steps. For example, pulling data from YouTube has following sub-steps.

  • Collect YouTube channel name from Drupal nodes field.
  • Get Youtube Channel upload playlist ID from YouTube with the collected channel name.
  • Cache function for playlist ID
  • Download YouTube video list JSON data with the playlist ID.
  • Parse the downloaded JSON into an array for next major step. That is to create Drupal queue tasks
  • Each of the sub-task or major task is easy to verify. Whenever, something goes wrong, we can follow the steps and find the broken one. From large scale to small, we can use this methodology. When we practise it more, our minds become more capable to find those steps with clear goals; We will foresee the problem when we choose the way to implement each step. That is before we do some real coding; That is how we can develop software that requires less maintenance.

    Test-driven development (TDD) relies on the repetition of a very short development cycle. The developer writes an automated test case before writing code. Our approach is a step ahead of it. When thinking about the solution, we find test cases first. Passing those test is the goal of next step - coding. We start think about test case when we read the requirement document. When we write code, we are thinking about how to break it. Whenever we finish a function, it went though many verification tests by ourselves. When it finishes, we have a much better chance to have a fully functioning module. If it does not work out, we can always return to each step and find the broken link by reiterating the verification process. I believe it is the most efficient way to develop something.

    Categories: Elsewhere

    Four Kitchens: Making reactive Headless Drupal 8 interfaces with Meteor

    Planet Drupal - Fri, 17/07/2015 - 23:30
    Meteor + Drupal = Real time Drupal interfaces

    Meteor is a JavaScript framework that enables developers to quickly create reactive, highly accessible applications. It can be an incredibly powerful tool, especially when paired with Drupal, which is a great content management system that makes it really easy to create well-structured content models and interact with data.

    Why not combine the two and let Drupal provide Meteor with semantic data with Meteor rendering that data in a reactive way?

    Drupal How-Tos
    Categories: Elsewhere

    Aten Design Group: The Publishing Experience on HRW.org

    Planet Drupal - Fri, 17/07/2015 - 21:34

    Human Rights Watch (HRW) has been sharing important stories for over 30 years and we were excited about enhancing the digital story-telling experience in the latest relaunch of HRW.org. Out-of-the-box, Drupal provided a great platform for us to craft tools that matched HRW’s internal publishing workflows, while allowing their publishers to create long-form content with videos, galleries and other rich content.

    Embedded Media

    Aten's design team set the bar with the new design direction for HRW.org. Their vision for the long-form articles included flexibility for embedding media content throughout the text. After a lengthy evaluation period with Drupal’s Media module, it become clear that HRW needed more flexibility than it provided. In addition to embedding file based media (i.e. images), there were requirements around embedded text based content like quotes and callouts for other node based content. For consistency, we went with the Node Embed approach that we’ve blogged about before. Having a node-based workflow also provided a familiar workflow for HRW’s publishers.

    Long-form Reports

    One of HRW’s most important tasks is creating in-depth reports on certain issues around the world. It's not uncommon for these reports to approach 100 pages In PDF form. Two goals of the relaunch included the report creation workflow in Drupal and improving report navigation.

    Report Creation Workflow

    HRW has an internal workflow for editing and publishing reports that they’ve used for years. The end product of that workflow is a printed report and an online HTML version. Rather than trying to force a new internal workflow, we discussed pain points HRW had with their current process and built a couple tools to provide a better experience.

    HTML Upload

    When creating report nodes in Drupal, HRW can upload the HTML file that was created outside of the content management system. The upload process adds anchor tags and generates a table of contents based on semantic heading tags, detects image references that do not exist on the site yet, and makes a few other formatting changes The report content and table of contents are then saved in the database rather than processing the uploaded content on the fly.

    Report Navigation

    In past iterations, reports were broken up into many pages. Now, users can use the table of contents to quickly jump to relevant sections of the report. Having reports on a single page also allows users to use built in browser tools like “Find” to search for keywords.

    Featured Content

    HRW has many topic and location based landing pages where editors can curate content. HRW wanted the flexibility to manually feature content or, given the large number of these pages, have the most relevant automatically show up. To achieve this, we used Views, Entity Reference, and a custom module to tie the two together. The custom code checks the Entity Reference field for manually curated content then utilizes Views to pull the relevant content into the remaining content slots available. This allows HRW to mix curated and automated content easily without having to choose one approach over the other.

    Related Content

    Rather than showing users additional content at the bottom of an article based on time or tag, we worked with HRW to craft an algorithm, or scoring system, to display related content. When deciding which relevant content to show, date, geography, and topic are all taken into consideration. Similar to featured content, HRW has the flexibility to manually relate content on any article with the algorithmic suggestions filling missing slots.

    Sharelines

    Once HRW publishes important information, they leverage social channels like Twitter to help spread the word. We provided HRW publishers the ability create curated Sharelines that are displayed prominently for users to Tweet directly from the article.

    It was exciting to work on such a large publishing project and help provide tools to help tell important stories in many languages. We hope you enjoy browsing the new HRW.org!

    Categories: Elsewhere

    Four Kitchens: Nearly Headless Drupal

    Planet Drupal - Fri, 17/07/2015 - 20:31

    Drupal is a pretty strong content manager, allowing you to build robust data models, easily enable content revisioning, and build a publishing workflow complex enough for even the strictest of editorial standards. However, the blistering speed of development on Drupal 8 appears glacial when compared with the rate of invention on the frontend of web development.

    Drupal
    Categories: Elsewhere

    OSTraining: Use the Masquerade Module to Test Drupal Roles

    Planet Drupal - Fri, 17/07/2015 - 20:27

    If you have a large Drupal site, you may have a large number of roles and users.

    To thoroughly test your site and make sure everything is working correctly, it's smart to browse your site under different roles.

    Yes, you can create fake accounts for each user role, but that becomes very cumbersome if you have more than a couple of roles.

    The Masquerade module is very easy to use, and it allows yourself to see the site through the eyes of any user you choose:

    Categories: Elsewhere

    Acquia: Gender balance in tech sales through data-driven, objective hiring

    Planet Drupal - Fri, 17/07/2015 - 18:48
    Language Undefined

    At a recent Acquia all-company meeting, I was glad to hear that half of the current group of Acquia U students and 7 out of 12 of the latest "BDR" hires in Sales were women. Acquia's CEO, Tom Erickson added that this was the result of some "objective, data-driven" hiring practices. I had to know more. I got Acquia Senior Manager of Business Development and Sales, Chris Hemberger on the line to talk about all of this.

    Categories: Elsewhere

    Drupal core announcements: Recording from July 17th 2015 Drupal 8 critical issues discussion

    Planet Drupal - Fri, 17/07/2015 - 15:18

    This was our 8th critical issues discussion meeting to be publicly recorded in a row. (See all prior recordings). Here is the recording of the meeting video and chat from today in the hope that it helps more than just those who were on the meeting:

    If you also have significant time to work on critical issues in Drupal 8 and we did not include you, let me know as soon as possible.

    The meeting log is as follows (all times are CEST real time at the meeting):


    [11:11am] jibran: https://www.drupal.org/node/2525910
    [11:11am] Druplicon: https://www.drupal.org/node/2525910 => Ensure token replacements have cacheability + attachments metadata and that it is bubbled in any case [#2525910] => 149 comments, 22 IRC mentions
    [11:12am] alexpott: https://www.drupal.org/node/2525910, https://www.drupal.org/node/2493911 is the issue dawehner is talking about
    [11:12am] Druplicon: https://www.drupal.org/node/2525910 => Ensure token replacements have cacheability + attachments metadata and that it is bubbled in any case [#2525910] => 149 comments, 23 IRC mentions
    [11:12am] Druplicon: https://www.drupal.org/node/2493911 => Update guzzle, goutte and mink-goutte-driver to the latest release [#2493911] => 140 comments, 6 IRC mentions
    [11:13am] dawehner: GaborHojtsy++
    [11:13am] dawehner: GaborHojtsy++
    [11:13am] alexpott: https://www.drupal.org/node/2524082 is the config overrides https://www.drupal.org/node/2524082
    [11:13am] Druplicon: https://www.drupal.org/node/2524082 => Config overrides should provide cacheability metadata [#2524082] => 110 comments, 32 IRC mentions
    [11:13am] Druplicon: https://www.drupal.org/node/2524082 => Config overrides should provide cacheability metadata [#2524082] => 110 comments, 33 IRC mentions
    [11:14am] GaborHojtsy: https://www.drupal.org/node/2338081
    [11:14am] Druplicon: https://www.drupal.org/node/2338081 => Local Tasks, Actions, and Contextual links should use a TranslationWrapper to encapsulate safe translatable strings from YAML files [#2338081] => 62 comments, 16 IRC mentions
    [11:14am] jibran: https://www.drupal.org/node/2493911
    [11:14am] Druplicon: https://www.drupal.org/node/2493911 => Update guzzle, goutte and mink-goutte-driver to the latest release [#2493911] => 140 comments, 7 IRC mentions
    [11:15am] WimLeers: https://www.drupal.org/node/2525910
    [11:15am] Druplicon: https://www.drupal.org/node/2525910 => Ensure token replacements have cacheability + attachments metadata and that it is bubbled in any case [#2525910] => 149 comments, 24 IRC mentions
    [11:15am] WimLeers: https://www.drupal.org/node/2532490
    [11:15am] Druplicon: https://www.drupal.org/node/2532490 => Unrouted URLs break toolbar but are hidden by caching [#2532490] => 31 comments, 8 IRC mentions
    [11:17am] WimLeers: https://www.drupal.org/node/507488?page=1#comment-10127746
    [11:17am] Druplicon: https://www.drupal.org/node/507488 => Convert page elements (local tasks, actions) into blocks [#507488] => 280 comments, 57 IRC mentions
    [11:22am] WimLeers: plach's issue: https://www.drupal.org/node/2351015
    [11:22am] Druplicon: https://www.drupal.org/node/2351015 => URL generation does not bubble cache contexts [#2351015] => 300 comments, 57 IRC mentions
    [11:23am] Fabianx-screen: https://drupalreleasedate.com/ shows 997 majors and 376 added in the last year.
    [11:24am] jibran: https://www.drupal.org/node/2504141
    [11:24am] Druplicon: https://www.drupal.org/node/2504141 => Information disclosure/open redirect vulnerability via blocks that contain a form [#2504141] => 66 comments, 12 IRC mentions
    [11:28am] dawehner: https://github.com/guzzle/guzzle/issues/1166
    [11:29am] dawehner: https://www.drupal.org/node/2493911
    [11:29am] jibran: https://www.drupal.org/node/2493911#comment-10124104
    [11:29am] Druplicon: https://www.drupal.org/node/2493911 => Update guzzle, goutte and mink-goutte-driver to the latest release [#2493911] => 140 comments, 8 IRC mentions
    [11:29am] Druplicon: https://www.drupal.org/node/2493911 => Update guzzle, goutte and mink-goutte-driver to the latest release [#2493911] => 140 comments, 9 IRC mentions
    [11:37am] dawehner: https://www.drupal.org/node/2528178
    [11:37am] Druplicon: https://www.drupal.org/node/2528178 => Provide an upgrade path for #2354889 (block context manager) [#2528178] => 45 comments, 9 IRC mentions
    [11:38am] dawehner: https://www.drupal.org/node/2528178#comment-10123746
    [11:38am] Druplicon: https://www.drupal.org/node/2528178 => Provide an upgrade path for #2354889 (block context manager) [#2528178] => 45 comments, 10 IRC mentions
    [11:43am] jibran: https://www.drupal.org/node/2464427#comment-10127680
    [11:43am] Druplicon: https://www.drupal.org/node/2464427 => Replace CacheablePluginInterface with CacheableDependencyInterface [#2464427] => 94 comments, 9 IRC mentions
    [12:14pm] dawehner: https://www.drupal.org/node/2338081
    [12:14pm] Druplicon: https://www.drupal.org/node/2338081 => Local Tasks, Actions, and Contextual links should use a TranslationWrapper to encapsulate safe translatable strings from YAML files [#2338081] => 62 comments, 17 IRC mentions

    Categories: Elsewhere

    Dirk Eddelbuettel: RcppRedis 0.1.5

    Planet Debian - Fri, 17/07/2015 - 15:11

    Another small update to RcppRedis arrived on CRAN this morning. The fix I made a few days ago addressing a unit test setup (for the rredis package loaded only for a comparison) didn't quite work out.

    Changes in version 0.1.5 (2015-07-17)
    • Another minor fix to unit test setup for rredis.

    Courtesy of CRANberries, there is also a diffstat report for the most recent release. More information is on the RcppRedis page.

    This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

    Categories: Elsewhere

    Dirk Eddelbuettel: RcppTOML 0.0.4

    Planet Debian - Fri, 17/07/2015 - 15:08

    We introduced RcppTOML in April with the initial CRAN release 0.0.3. It permits R to read the (absolutely awesome) TOML format which is simply fabulous for configuration files.

    A new version appeared on CRAN yesterday. We had observed a somewhat rare segfault in our production use which came down me dereferencing a list iterator which checking length first. Ooops.

    As usual, a few other changes were made as, mostly to stay on the good side of R CMD check --as-cran for the development version of R.

    Courtesy of CRANberries, there is also a diffstat report for this release More information is on the RcppRedis page.

    This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.

    Categories: Elsewhere

    Simon Kainz: DUCK challenge: week 2

    Planet Debian - Fri, 17/07/2015 - 11:30

    Just a litte update on the DUCK challenge: In the last week, the following packages were fixed and uploaded into unstable:

    Last week we had 10 packages uploaded & fixed, the current week resulted in 15 fixed packages.

    So there are currently 25 packages fixed by 20 different uploaders. I really hope i can meet you all at DebConf15!! The list of the fixed and updated packages is availabe here. I will try to update this ~daily. If I missed one of your uploads, please drop me a line.

    A big "Thank You" to you.

    There is still lots of time till the end of DebConf15 and the end of the DUCK Challenge, so please get involved.

    And rememeber:

    Categories: Elsewhere

    John Goerzen: First steps with smartcards under Linux and Android — hard, but it works

    Planet Debian - Fri, 17/07/2015 - 05:04

    Well this has been an interesting project.

    It all started with a need to get better password storage at work. We wound up looking heavily at a GPG-based solution. This prompted the question: how can we make it even more secure?

    Well, perhaps, smartcards. The theory is this: a smartcard holds your private keys in a highly-secure piece of hardware. The PC can never actually access the private keys. Signing and decrypting operations are done directly on the card to prevent the need to export the private key material to the PC. There are lots of “standards” to choose from (PKCS#11, PKCS#15, and OpenPGP card specs) that are relevant here. And there are ways to use SSH and OpenVPN with some of these keys too. Access to the card is protected by a passphrase (called a “PIN” in smartcard lingo, even though it need not be numeric). These smartcards might be USB sticks, or cards you pop into a reader. In any case, you can pop them out when not needed, pop them in to use them, and… well, pretty nice, eh?

    So that’s the theory. Let’s talk a bit of reality.

    First of all, it is hard for a person like me to evaluate how secure my data is in hardware. There was a high-profile bug in the OpenPGP JavaCard applet used by Yubico that caused the potential to use keys without a PIN, for instance. And how well protected is the key in the physical hardware? Granted, in most of these cards you’re talking serious hardware skill to compromise them, but still, this is unknown in absolute terms.

    Here’s the bigger problem: compatibility. There are all sorts of card readers, but compatibility with pcsc-tools and pcscd on Linux seems pretty good. But the cards themselves — oh my. PKCS#11 defines an interface API, but each vendor would provide their own .so or .dll file to interface. Some cards (for instance, the ACOS5-64 mentioned on the Debian wiki!) are made by vendors that charge $50 for the privilege of getting the drivers needed to make them work… and they’re closed-source proprietary drivers at that.

    Some attempts

    I ordered several cards to evaluate: the OpenPGP card, specifically designed to support GPG; the ACOS5-64 card, the JavaCOS A22, the Yubikey Neo, and a simple reader listed on the GPG smartcard howto.

    The OpenPGP card and ACOS5-64 are the only ones in the list that support 4096-bit RSA keys due to the computational demands of them. The others all support 2048-bit RSA keys.

    The JavaCOS requires the user to install a JavaCard applet to the card to make it useable. The Yubico OpenPGP applet works here, along with GlobalPlatform to install it. I am not sure just how solid it is. The Yubikey Neo has yet to arrive; it integrates some interesting OAUTH and TOTP capabilities as well.

    I found that Debian’s wiki page for smartcards lists a bunch of them that are not really useable using the tools in main. The ACOS5-64 was such a dud. But I got the JavaCOS A22 working quite nicely. It’s also NFC-enabled and works perfectly with OpenKeyChain on Android (looking like a “Yubikey Neo” to it, once the OpenPGP applet is installed). I’m impressed! Here’s a way to be secure with my smartphone without revealing everything all the time.

    Really the large amount of time is put into figuring out how all this stuff fits together. I’m getting there, but I’ve got a ways to go yet.

    Update: Corrected to read “signing and decrypting” rather than “signing and encrypting” operations are being done on the card. Thanks to Benoît Allard for catching this error.

    Categories: Elsewhere

    OSTraining: Can't Find the "Install new module" Link in Drupal?

    Planet Drupal - Fri, 17/07/2015 - 01:54

    When developers install Drupal modules, they rely on Drush or version control to manage their work.

    However, most ordinary Drupal users do everything through the admin interface. They install modules via the "Install new modules" link.

    Sometimes that link goes missing. If you can't find your "Install new modules" link, here are four possible solutions.

    Categories: Elsewhere

    DrupalCon News: Meet the Local Community!

    Planet Drupal - Thu, 16/07/2015 - 18:42

    The European DrupalCon in 2015 will take place in the beautiful city of Barcelona, one of the most visited and explored Spanish and European destinations for visitors from all around the world. But beyond the touristic appeal, Spain and Barcelona are the houses of very active and healthy Drupal communities.

    Categories: Elsewhere

    Petter Reinholdtsen: Typesetting DocBook footnotes as endnotes with dblatex

    Planet Debian - Thu, 16/07/2015 - 18:10

    I'm still working on the Norwegian version of the Free Culture book by Lawrence Lessig, and is now working on the final typesetting and layout. One of the features I want to get the structure similar to the original book is to typeset the footnotes as endnotes in the notes chapter. Based on the feedback from the Debian maintainer and the dblatex developer, I came up with this recipe I would like to share with you. The proposal was to create a new LaTeX class file and add the LaTeX code there, but this is not always practical, when I want to be able to replace the class using a make file variable. So my proposal misuses the latex.begindocument XSL parameter value, to get a small fragment into the correct location in the generated LaTeX File.

    First, decide where in the DocBook document to place the endnotes, and add this text there:

    <?latex \theendnotes ?>

    Next, create a xsl stylesheet file dblatex-endnotes.xsl to add the code needed to add the endnote instructions in the preamble of the generated LaTeX document, with content like this:

    <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <xsl:param name="latex.begindocument"> <xsl:text> \usepackage{endnotes} \let\footnote=\endnote \def\enoteheading{\mbox{}\par\vskip-\baselineskip } \begin{document} </xsl:text> </xsl:param> </xsl:stylesheet>

    Finally, load this xsl file when running dblatex, for example like this:

    dblatex --xsl-user=dblatex-endnotes.xsl freeculture.nb.xml

    The end result can be seen on github, where my book project is located.

    Categories: Elsewhere

    Osamu Aoki: debmake and debamke-doc and debian-handbook

    Planet Debian - Thu, 16/07/2015 - 17:33
    While updating the maintainer's guide, I had faced with several issues to update it as it is, since it was based on the dh-make package and does not play nice with new features such as multi-arch etc.  Also. the lack of capability to create a decent copyright information template was my concern.

    I have created the debmake tool to address shortcomings of dh-make.  It was good attempt for Jessie, but it has not so nice bug on parsing copyright.  So I decided to drop it for Jessie.  https://packages.qa.debian.org/d/debmake.html
    The current testing repository has the updated debmake command.  With the -k option, you can check if the your debian/copyright is covering all the files properly in source or not.
    Since I got this updated package, I rewrote the maintainer's guide from scratch.  Now it is available in the debmake-doc package.  You can see all the packaging cases including autotools, cmake, and libraries.  If I made a mistake, let me know.  As you may noticed, debian-doc related web pages are now generated from the latest uploaded packages mostly.  debmake-doc is no exception.    "Guide for Debian Maintainers"   https://www.debian.org/doc/manuals/debmake-doc/index.en.html
    By using debmake as the template generation tool, the document can be made shorter and there are many practical examples.  More over, all the source code examples can be found in the source tree.  Try:
     $ apt-get source debmake-doc $ sudo apt-get install devscripts build-essentials $ sudo apt-get build-dep debmake-doc $ cd debmake-doc* $ make
    You get the simulated log of building all the details of the packaging examples in this way.
    With upcoming uploads, I should fix some CSS for the better cell phone compatibility but this is in good shape from the PC browsers.
    Oh, not last ... NOW debian-handbook is on our www.debian.org server and its mirrors.
    I think this is the most comprehensive work on Debian system and deserves to be presented in our web pages prominently.  Kudos for people who wrote this fine manual.
       https://www.debian.org/doc/manuals/debian-handbook/
    (I think outdated reference to old TLDP pages should be mostly dropped in our https://www.debian.org/doc/ page.)
    Please note web pages on www.debian.org has been modified to make the language based content negotiation.  So you should see the page based on your browser settings.
    Osamu
    Categories: Elsewhere

    Christoph Egger

    Planet Debian - Thu, 16/07/2015 - 16:40

    Mostly a mental note as I've reinvented this the second time now. If you just quickly want to share some org-mode notes with some non-Emacs-users the built-in HTML export comes handy. However it has one Problem: All source syntax highlighting is derived from your current theme. Which of course is a bad idea if your editor has a dark background (say Emacs.reverseVideo: on). The same if your terminal's background color is dark.

    Running Emacs in batch mode and still getting colorful code formatting seems to be an unsolved problem. All that can be found on the Internet suggests adding a dark background to your HTML export (at least to the code blocks). Or maybe use an external style-sheet. Both not exactly the thing if you just want to scp snippets of HTML somewhere to share. However there's a working hack:

    #!/usr/bin/make -f %.html: %.org xvfb-run urxvt +rv -e emacs -nw --visit $< --funcall org-html-export-to-html --kill >/dev/null

    So use a terminal you can easily force into light-background-mode (like urxvt +rv) so the emacs -nw runs in light-background-mode and wrap the thing in xvfb-run so you can properly run this over ssh (and don't get annoying windows pop up and disappear again when typing make)

    Categories: Elsewhere

    Pronovix: Interview with a d8upgrade user

    Planet Drupal - Thu, 16/07/2015 - 15:18

    If you are still hesitating if it's worth the effort to sign up for d8upgrade, we wanted to give you an account from one of our users who did already do so. We asked omong_kosong, if we could interview him for a blogpost, what follows are his answers to the questions we sent him.

    What do you think about the d8upgrade service? Was it helpful?

    Categories: Elsewhere

    Pages

    Subscribe to jfhovinne aggregator - Elsewhere