12-13-2009, 03:42 PM | #31 |
Sigil Developer
Posts: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
|
Question about importing meta data tags from HTML
Hi,
I often work with a script called xpml2xhtml.py that converts pml to xhtml and then use Sigil to make the epub. Typically this involves importing a single html file that has meta information in the head of the html file: For example: <meta name="Title" content="The Iraq Study Group Report" /> <meta name="Author" content="James A. Baker, III, and Lee H. Hamilton" /> <meta name="Publisher" content="Government of the United States" /> I assume that I can simply use the QDomDocument approach to get easy access to all of these meta tags and their values. Otherwise getting them via regular expressions is not that hard either. Would it be of any interest to you if I tried to create a patch that did something like this so that the meta info dialog is filled in based on these values upon import of an html file? A project like that would be a useful way to force myself to get more up to speed on the code while trying to help out in some way, but I don't want to step on any feet so to speak. If you think something like this would be useful, I would be happy to give it a try over the holidays. Take care, KevinH |
12-13-2009, 04:01 PM | #32 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
But you've possibly picked the wrong time to get up to speed on the code. I'm neck deep in the 0.2.0 redesign and even now, 10% through, the architecture is substantially different. But since you'll be working on metadata detection for HTML, that should nicely survive the other changes I'm currently making. Basically yes, I like this idea a lot. Don't use regular expressions though. Use QDomDocument. You can contact me over email if you wish to discuss this further. |
|
12-24-2009, 05:11 AM | #33 |
Banned
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
I've deleted /opt/sigil and installed the Linux 64-bit 1.6b version.
Still getting the same error: Code:
sigil: symbol lookup error: sigil: undefined symbol: _ZN9QListData7detach3Ev m a r EDIT: Okay, it's something to do with the /usr/bin/sigil link. The desktop file that is installed to the Desktop points to /opt/sigil/sigil.sh, and that works fine. /usr/bin/sigil points to /opt/sigil/sigil. I've updated my panel launcher, so I'm good from here, but just typing sigil at a command prompt does not work. Double-clicking on /opt/sigil/sigil in Thunar works fine, too. Thanks! Last edited by rogue_ronin; 12-24-2009 at 05:27 AM. Reason: updated info |
12-24-2009, 07:41 AM | #34 |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
|
12-24-2009, 02:16 PM | #35 |
Banned
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Just used the uninstaller, and reinstalled Sigil. Exact same issue.
Tried to make a link to /opt/sigil/sigil.sh -- made an infinite loop of sigils launching (mistake!) Can you explain what should be done to avoid the error from the command line? No worries, not urgent, m a r |
12-24-2009, 04:05 PM | #36 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
If you use the uninstaller provided with the current release of Sigil, it will not remove the shortcut in /usr/bin/. Why? Because the current Sigil installer doesn't create one, so there's nothing to remove. And I'm not going to make the uninstaller remove files the installer didn't install. With regards to the infinite loop problem... that's the reason why there's no shortcut in 0.1.6 . The thing is, 0.1.6. for linux had issues because now Sigil is using the Nokia provided binaries of Qt. So I quickly made the b version for linux that uses the bash script for launching. The script appends the current working directory to the library search path so the Sigil Qt libs are picked up. This is a Nokia provided script. Since I was pressed for time to update the linux version, I didn't modify the script to fix this shortcut problem. I just removed the shortcut from the installer. There's little point in it anyway, since you have the desktop shortcut and one in the "start" menu as well. |
|
12-24-2009, 06:54 PM | #37 |
Banned
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Sorta thought that's what was going on, after glancing through the script.
I deleted the /usr/bin/sigil link myself -- as you say, I'm good with the desktop file. The only reason to launch from command line is for error output, and if I need that, I'll just remember to migrate to the /opt/sigil folder and launch it. I'm looking forward to 2.0 -- thanks for your commitment to this, and the great work. m a r |
12-25-2009, 03:19 AM | #38 | |
Banned
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Quote:
Thanks, m a r |
|
12-25-2009, 05:35 AM | #39 | |
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
All DC metadata entries the epub spec supports should be supported. |
|
12-25-2009, 04:05 PM | #40 | |
Banned
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
Quote:
I'll take another look today. And I'll try to extract a list for others to use. A basic meta tag, such as: Code:
<meta name="DC.title" content="A Princess of Mars" /> But if you could answer this question: where are you storing values like "Author", "Editor", etc., for tags that have refinements (as they're referred to in the 2003 spec?) Is it Code:
<meta name="DC.creator.author" content="Edgar Rice Burroughs" /> Code:
<meta name="DC.creator.aut" content="Edgar Rice Burroughs" /> Similarly, what time/date events are you supporting, and how to code them? ie: what values are being used? There are different values in different sources and examples: Code:
<meta name="DC.date.published" content="1912" /> Code:
<meta name="DC.date.publication" content="1912" /> Using the <link> tag is beyond me at the moment. Thanks for reading, m a r |
|
12-25-2009, 05:34 PM | #41 |
Banned
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
|
12-26-2009, 03:40 AM | #42 |
Addict
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
|
MacPorts released
I have just uploaded the new MacPorts version which now compiles with SnowLeopard. Sorry it took so long.
The new version needs "qt4-mac-devel" which conflicts with "qt-mac". On SnowLeopard you might need to explicitly choose the "+x86_64" variant. The good news: The MacPorts version is only 2,3M on your hard-drive. Martin |
12-26-2009, 09:00 AM | #43 | |||
Created Sigil, FlightCrew
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
|
Quote:
Quote:
Quote:
The DC people are not programmers and I doubt a single one was consulted during the process of creating that spec so it's highly ambiguous. So Kevin (who contributed the code) smartly chose to follow the conventions used in that document. So the date events are past tense verbs, not nouns. I'll make Sigil choose either, so you'll be able to use nouns too. But only for publication, creation and modification. Those are the only event dates supported, since those are the ones the epub spec mentions. Everything else is completely arbitrary and thus not supported. Last edited by Valloric; 12-26-2009 at 09:17 AM. |
|||
12-26-2009, 05:17 PM | #44 |
Banned
Posts: 475
Karma: 796
Join Date: Sep 2008
Location: Honolulu
Device: Nokia 770 (fbreader)
|
That is excellent, and just what I was hoping to learn. And supporting what's in the ePub spec makes perfect sense. I may have a few more questions about what is supported, but I see that Kevin has answered me in the other thread, so I'll start over there.
Thanks as always, m a r |
01-24-2010, 01:31 PM | #45 |
Well trained by Cats
Posts: 29,688
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil 0.2.4 | Valloric | Sigil | 16 | 09-09-2010 11:04 AM |
Sigil 0.2.3 | Valloric | Sigil | 16 | 06-25-2010 10:59 AM |
Sigil | Marc_liest | Software | 19 | 06-01-2010 12:59 AM |
Sigil v0.1.5 | Valloric | Sigil | 66 | 12-01-2009 06:55 PM |
Sigil v0.1.2 | Valloric | Sigil | 52 | 08-18-2009 03:15 AM |