Home

National Service

  • Oct. 17th, 2009 at 11:20 PM
I'm in Basic military training now. I got into the known strictest company out of all other 26 companies. I feel very unfortunate.
I'm struggling the harsh training, and it's going to get more intense and rough.

Let's see if I take back my words when I've completed this training.

Tags:

lex & yacc

  • May. 9th, 2009 at 7:31 PM
Looks like a package for writing grammer, that will generate C code to parse a text format. Means should be able to write a grammer to read your own text file format like reading a config file or text map data.

I want to port my school project game developed using Panda3D. To keep the art assets, I require to read the Panda3d's model files on my own.
Panda3D model file, the postfix extension is egg. egg is in text.

Instead of using massive strcmp and switch cases, I thought lex & yacc is the solution to write good text parser code.

But this writing have been delayed for months, egg format have too many things to handle. I lost motivation to write anymore.

I was intending to write an egg viewer from scratch using OpenGL and including a image library, and I tie in all by my own.
But it is not practical, when odviously there is already a viewer by the very creator, the bloated Panda3d itself.

Well.. It's good to learn lex & yacc at least.
Evernote makes it's own version of importing from google notebook, since google is closing it.
Thus this script becomes useless.

I've hacked up (as in written in very untidy style, and not professional) a short Python script to convert from
Google Notebook to Evernote.

In Google Notebook, you export as an atom and save it somewhere as 'read.xml'. On your console, navigate to the directory you have saved and execute the python script. It would make a file called 'write.enex' for you to import to evernote.
Yes I know I should like read the input and output filename in command parameters, but this is just a quick script i hacked up.

I'm sharing it out, if there's someone who needs it.

This script works **most** of the time. But there might still have problems such as source url is in the title, can't sync upstream because "the content data is incorrect". It does not support tags either.

You need to know some knowledge of python and at least know how console navigation such as you know which current directory you are in.
http://pastebin.com/f7f29139e

Tags:




    follow me on Twitter


    Advertisement

    Latest Month

    October 2009
    S M T W T F S
        123
    45678910
    11121314151617
    18192021222324
    25262728293031
    Powered by LiveJournal.com