File > Index and Folders to a folder-full of Bike outliner files provides good:
- Indexing of Bike outline text and (highlight) annotations
- Display of Bike outlines in the CSS format defined by
DEVONthink > Preferences > Web > Style Sheet
BUT if we edit a Bike Outline (they use an XML/HTML format) in a DT think window (rather than using
Data > Open With ... Bike)
then something unfortunate happens in DEVONThink 3 (3.8.7):
- Although the DT think window continues to display the existing
.bike file name, in fact DT renames the
.bike file to give it an
.html extension (rather than making an additional copy with an .html extension), and the original
.bike file no longer exists in the indexed folder.
- DT makes changes to the renamed file which prevent Bike from opening it again (mainly an XML → HTML coercion)
Is this by design ? It somehow feels a bit inadvertent.
Is there a setting in DEVONthink that I can use to prevent it from renaming (rather than copying) files in an index folder ?
FWIW in addition to the renaming without making a copy, the changes made to the Bike outline, rendering it unopenable by Bike, seem to turn on the distinction between XML and HTML:
- DEVONThink comments out the XML header in a Bike outline.
- Single unpaired tags in the Bike outline, like
<meta charset="utf-8"/> have their penultimate “/” stripped out, coercing them from the XML pattern to an HTML pattern. Similarly,
These changes are very understandable in an HTML editor, but as they render the file unusable in Bike, creating an
.html copy would be preferable to a rename and overwrite without warning.
Thanks – I see that you’ve made a helpful suggestion in another thread:
an element that still troubles me is that:
- the DT Think Window continues to display the old file name, as if it still existed
- we don’t get any kind of warning or option before the file is renamed.
A smart rule seems a good interim fix, but do you share my feeling that there might be good reason to adjust the default behaviour ?
(it can be a bit alarming to find that the named file no longer exists)
DEVONthink just supports editing HTML files but doesn’t support third-party requirements like the one of Bike files. Therefore editing them via DEVONthink might break the compatibility to Bike as the XML/HTML tags might & will change.
Absolutely – I quite understand that the output HTML will differ.
But changing a file name without warning ? And displaying the old file name as if it still existed ?
( Note, of course, that we are not discussing the contents of a DT database, just the indexing of an external Finder folder – unannounced file name changes feel a bit more uneasy in that context )
In the meanwhile, at your suggestion, I’m trying a Smart Rule, which appears to work – not sure if these look like sensible settings:
If you’re only creating .bike files in one database, I would target that database (and potentially a group if you’re only working in a specific location in the database) instead of Databases.
According to their website, they’re using HTML. What exactly is this “XML/HTML format”, anyway? Afair, there was XHTML once, but that is (hopefully) quite dead now.
The issue is not the format of the new .html file – but the unannounced deletion of a .bike file.
FWIW Bike files are technically XML, in the pattern of an html-style
<ul> <li> nest.
Expand to view XML in pattern of html ul li outline
<?xml version="1.0" encoding="UTF-8"?>
Yes, I started by doing that, but as a prophylactic against the default of unannounced user file deletion, I extended it to blanket protection.
(In practice, I’m personally just using one external folder – indexed by DEVONthink)
That looks … unusual. And I guess third-party software will simply ignore the xml header and everything it implies.
Which explains that DT „mangles“ some of the elements. But it shouldn’t change the file extension, of course.
I agree – a map (copy) from one file format to another (.bike → .html) is absolutely fine, but deletion of the original is unnecessary and clearly undesirable.
( Not least when unannounced )
I’m experimenting with Bike inside DT and found that locking the Bike file in DT is a workaround. DT won’t edit or rename it, as far as I can see, and I can open it externally in Bike.
A participant in the excellent Outlinersoftware.com announced a cure for .bike transmogrification in Devonthink.
Quoting user Jack Baty:
There’s a hidden preference in DTP that lets you add file extensions that are to be treated as plain text.
defaults write com.devon-technologies.think3 AdditionalPlainTextExtensions -string .bike
This fixed the .html problem for me. My notes: Jack Baty's Wiki — A sort of Rudimentary Lathe
Seems to work perfectly.
Is there a hidden preference for DT to treat certain file types as read-only? With Jack’s fix you can still edit a bike file as if it were plain text.
Indeed an option, though I would not have thought of that (and aparrently didn’t )