Tried.jamesbond wrote:Try it.
All right.
Going to convert entire FAQ to mdview.....
Help can be launched by:
Code: Select all
export TEXTDOMAIN=fatdoghelp; mdview -x /usr/share/doc/faqs ../home.md "" "Fatdog"
Tried.jamesbond wrote:Try it.
Code: Select all
export TEXTDOMAIN=fatdoghelp; mdview -x /usr/share/doc/faqs ../home.md "" "Fatdog"
Code: Select all
$(gettext fatdoghelp "The VLC media player in Fatdog64 can support BluRay playback.")
Code: Select all
alias _=gettext
Code: Select all
#!/bin/sh
gettext fatdoghelp "$1"; echo
Code: Select all
$(t_ "The VLC media player in Fatdog64 can support BluRay playback.")
Code: Select all
$((16 * `grep msgid fatdoghelp.pot | wc -l` / 1024))
Code: Select all
$(t_ fatdoghelp"The VLC media player in Fatdog64 can support BluRay playback.")
Code: Select all
$(gettext fh "The VLC media player in Fatdog64 can support BluRay playback.")
Code: Select all
$(t_ fh "The VLC media player in Fatdog64 can support BluRay playback.")
As quoted by disciple "use any text editor": I am using geany.musher0 wrote:what editor do you use to create the marked text...
This text is to be viewed by (surprise): see title of this thread and initial post.musher0 wrote: ... to be viewed?
Wrong cut of sentence, Mister L18L Translator.L18L wrote:As quoted by disciple "use any text editor": I am using geany.musher0 wrote:what editor do you use to create the marked text...
This text is to be viewed by (surprise): see title of this thread and initial post.musher0 wrote: ... to be viewed?
Using this we do need neither web server nor web browser for (run time translated) help files.
John Gruber wrote:The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.
Excellent.01micko wrote:How about a run action?
text_x-markdown (replace the current symlink in fatdog)Code: Select all
#!/bin/sh DIR=${@%/*} FILE=${@##*/} HOME=$FILE TITLE=${FILE%.*} mdview $DIR $FILE "$HOME" "$TITLE"
In older pups with older shared-mime-info it is reported wrongly as application_x-genesis-rom .. see https://bugs.freedesktop.org/show_bug.cgi?id=27441
Code: Select all
#! /bin/sh
DIR=${@%/*}
FILE=${@##*/}
TITLE=${FILE%.*}
case $DIR in
/usr/share/doc/faqs) # fd64-701
HOME=index.md
TEXTDOMAIN=fatdoghelp mdview -x $DIR $FILE "$HOME" "$TITLE"
;;
*)
HOME=$FILE
mdview $DIR $FILE "$HOME" "$TITLE"
;;
esac
Maybe it is not always necessary to think much01micko wrote:Dunno what on earth I was thinking ( ), but maybe $HOME should be something else as to not cause conflict with the environmental variable, user's $HOME.
Yes you are right!L18L wrote:Maybe it is not always necessary to think much01micko wrote:Dunno what on earth I was thinking ( ), but maybe $HOME should be something else as to not cause conflict with the environmental variable, user's $HOME.
I had not noticed any conflict.
my /etc/xdg/rox.surceforge.net/MIME-types/text_x-markdown wrote:#! /bin/sh
DIR=${@%/*}
FILE=${@##*/}
TITLE=${FILE%.*}
thisHOME=$FILE
case $FILE in
README*)
mdview -x $DIR $FILE "$thisHOME" "$TITLE"
;;
esac
case $DIR in
/usr/share/doc/faqs)
thisHOME=index.md
TITLE=Fatdog64
TEXTDOMAIN=fatdoghelp mdview -x $DIR $FILE "$thisHOME" "$TITLE"
;;
*)
mdview $DIR $FILE "$thisHOME" "$TITLE"
;;
esac