xtina: (Default)
For the record, you can back up your Dreamwidth account using ljdump. The first run takes foreeever. Subsequent runs are quick, as they just synchronize new/updated/deleted items.

This does use Python. I wish there were an easier way to do everything.
xtina: A steampunk heart, from here: http://www.girlgeniusonline.com/comic.php?date=20050926 (geeky)
Goddammit. I could do this in Python in two seconds, but C# is thwarting me.

In Python:

countryInfo = {
	'Australia': {
		'id': '13',
		'pre': '61',
		'len': '9'
	},
	'Spain': {
		'id': '207',
		'pre': '34',
		'len': '9'
	}
}
country = "Spain"
print "The prefix for %s is %s" % (country, countryInfo[country]["pre"])


Output:

The prefix for Spain is 34


But how do I do this well in C#?

Context. )

[eta] Current implementation. )
xtina: (Default)
Today, I want a way to make a fairly simple GUI program for Windows.  I already have the CLI script mostly written in Python, but I'm writing this for someone who prefers a GUI, and it's nice to learn new things.

The issue I'm running into is that I can't easily parse Tkinter, and I don't know why.  So perhaps a tutorial?

Just a few easy screens, is all I need...

I'm vaguely embarrassed to admit this, but, what I ideally want is a way to make a moderately useful GUI-orientated program, that's as easy to make as a UserForm in VB for Applications.
xtina: (Default)
I put together a Python script to extract data from a DBF file into a SQL file, import it into SQL Server, and convert it to a set of data I need.

Because I am a GOD.
xtina: (Default)
I am not good at recursion.  *sadface*

I am writing a Python script to translate a TestLink export into something better.  A common TestLink structure:

[folder] Navigation
  [folder] Customer
    [case#] Edit profile
    [case#] Upload photo
  [folder] Admin
    [folder] System
      [case#] Change theme
      [case#] Edit employees
    [folder] Calendar
      [case#] Add appointment
  [case#] Drop-down menu animations


A case has prerequisites, steps, and expected (that I care about).  So I want a Python script to pull that out of each case, while preserving the original structure.  The problem is, I have never been good at grokking recursion, even before one got into Python.  I mean, I can sort of see, but "sort of see" and "accurately code" are worlds apart.

For a folder and case, it needs to make a section tag, set the name to the name of the folder, then create the case and append it to the folder.  If it's at the base of the folder (the drop-down item, above), it needs to go in the "All Cases" section.

And there might be multiple top-level cases... at least they're all at the bottom.

So I'd want to:

main:

* open the XML file
* run dosection
* put the whole shebang into a file

dosection:

* keep the name of the thing it's to be added to (e.g., "Admin", "root")
* create a section (e.g., "System", "All Cases") and name it appropriately
* for each case-or-section underneath:
** if there's a new section in there, start this again
** otherwise, run the makecase function
* append the thing to the original section bit

makecase:

* carry along the name of the section it's to be added to (e.g., "System", "All Cases")
* create the prereq node; add data; add to section
* create the summary node; add data; add to section
* create the expected node; add data; add to section
* return to dosection

...maybe?
xtina: (Default)
Welp, I may have done something wrong along the way (Python, Google Project Hosting, Subversion), but if you want a Python script to export a list of all untagged entries from nearly any* LJ-like, you can go here.

Feel free to advise if something could be done better, or... uh... tinker with it, as I think one can do with Google/Subversion.

* I don't have an account at them all, so I have nooo clue.  But it def. works on Dreamwidth and Livejournal.
xtina: (Default)
Welp, I may have done something wrong along the way (Python, Google Project Hosting, Subversion), but if you want a Python script to export a list of all untagged entries from nearly any* LJ-like, you can go here.

Feel free to advise if something could be done better, or... uh... tinker with it, as I think one can do with Google/Subversion.

* I don't have an account at them all, so I have nooo clue.  But it def. works on Dreamwidth and Livejournal.

June 2017

S M T W T F S
    123
45678 910
11121314151617
18192021222324
252627282930 

Most Popular Tags

Style Credit

Page generated 2017-06-27 15:28
Powered by Dreamwidth Studios