Bulk rename/delete on many wiki pages in trac, how? - bug-tracking

does trac web interface provide a way to delete, rename, etc. a lot of wiki pages as a whole, without having to do the tedious task one by one and manually? Something like a checkbox for each page, followed by a Delete button.
Thanks

You can do this through the trac-admin command-line utility. Use the syntax
trac-admin /path/to/project/env wiki remove WikiPageName
to remove a wiki page. You should be able to write a simple script that runs this command for every page in a list. You can use the wiki list command to retrieve a list of all wiki pages, which might be useful if you are wanting to delete wiki pages whose names follow a particular pattern (also useful for deleting a page and all of its sub-pages).

update use bta's answer instead of this.
There is no trac interface I am aware of, but you might be able to do this by manually editing the database. For example SQLite Database Browser is able to open the db/trac.db file and might be a little bit less tedious than manually using the trac interface. But make a backup before you try....
You have to edit the name field in the wiki table.

Related

Is there a way to build my own vim knowledge base like the help system

For example:
:Kb js
or
:Kb javascript
will lead me to my own javascript page
Yes, you can just add additional files to ~/.vim/doc/. As long as you use Vim's help syntax (*name* for tag definitions and |name| for links), you just need to update the help database via :helptags ~/.vim/doc, and then have your knowledge base available via :help name. I personally use that for "cheat pages" for certain filetypes, and to provide summary information for complex plugins.
It should also be possible to put your knowledge base into a separate directory. Then, you would have to reimplement the :help command, probably by temporarily directing the 'tags' value to it and using :tag.

Tabcompletion and docview while editing rc.lua

I saw that there is a lua plugin for eclipse and there is a docpage on the awesome main page api_doc and all the .lua files in /usr/share/awesome/lib.
So I thought it must be possible to create a Library or Execution Environment so that one has tabcompletion and docview.
So I tried making my own Execution Environment:
wrote the standard .rockspec file
downloaded the documentation made an ofline version of it and put it in docs/ folder
ziped the files and folders in /usr/share/awesome/lib
ziped all up
tried it out ... and it failed.
When I try to view a documentaion for a .lua file I get "Note: This element has no attached documentation."
Questions: Am I totaly wrong in my doing (because I have the feeling I am)? Is there any way to edit the rc.lua with tabcompletion and docview?
Koneki will probably take a while to setup, but it's definitly worth it. Going for the".doclua"(by using version 1.2) would certainly make it, but I doubt that using a script to generate the information you need, would work out on the long run.
Most likely, you'll probably pass a bit of time to define what kind of object you're dealing with every time you come across one. The right to do, would be to actually take the time to see if the object/module/inner type inherit from an another object, so can actually have more completion feature as you keep using autocomplete to go from one object to another by pressing "dot"+ctrl_space.
In an ideal world, one person could probably make it right and share to other, so they can enjoy a full featured autocomplete editor.
Found solution for eclipse.
First off the idea of setting up an Execution environment was the wrong one.
So the whole thing about downloading the doc although.
For more information on that visit eclipse Wiki for LUA Development Tool.
The right thing to do is to add a source folder which contains the /usr/share/awesome/lib directory.
The bad news is that my comment from above was totally right, which means one has to configure each .lib file in /usr/share/awesome/lib to meet the requirements of the Documentation Language described here.
Than editing the rc.lua (which one can add to the project in eclipse) works with tabcompletion and doc view.
Since the Documentation Language used in the lib files is similar to the one used by "LUA Development Tool" one has not to change many things. Maybe there are even scripts for that.

Search through scripts of (multiple) cimplicity screens

We are using Cimplicity to operate some installations at our plant. The frontend consists of a lot of .cim files, which are the screens presented to the operator. These files are built with 'cimedit', which is basically a graphical click and drag program with which you can assemble the screens. Each object you drag onto the screen has the option to run a script, which brings me to my problem.
Because each screen contains a lot of small scripts and functions it is hard to keep track of what does what. For example I'm trying to figure out where a certain table from my database is being accessed or updated. Since the files all seem to be compressed (or so) I can't use a regular 'search the contents of this file' search.
Things I've tried so far are searching using windows, with the content option enabled and also tried the compression option. This had no success. It makes sense because like I said, the files seem to be compressed, so the actual script is not stored in plain text.
So, my question in short:
How do I search all the scripts of (preferably multiple) cimplicity screens?
Any tips on how to search compressed files are also very much appreciated.
I stumbled upon another stackoverflow post while searching for a better windows search tool and ended up finding this post: https://superuser.com/questions/26593/best-way-to-confidently-search-files-and-contents-in-windows-without-using-an
This posts recommends Agent Ransack and it is actually possible to search through the .cim files with this tool.

How to edit your views in CouchDB Futon?

I am using CouchDB Futon to edit the views and shows. But I find it hard to edit the JavaScript code because of converting the newline to "\n". Also, it is hard to do all the escaping work.
What do you use to edit your views?
Maybe you want to have a look at the CouchApp framework. It allows you to have your map, reduce, show, list etc. functions in text files you can edit with the editor of your choice. A simple command pushes them to your design documents. It is intended for building CouchApps, but might as well be useful if you only need to edit your views.
http://couchapp.org
http://github.com/couchapp/couchapp
You can edit view code by browsing to it in Futon, and then expanding the source code area. You can then save/undo, etc.
For the other functions, and views too, you can always use LoveSeat.
Cheers.

How can I find files that aren't needed on my site so I can delete them?

I'm developing a website, and after testing different ways to do things, I know that I have many files on my site that are not being used, including HTML/PHP files, images, stylesheets, and external scripts. Is there some program I can use or something so I can find all of the files that I don't need so I can delete them?
I need to find all files that are safe to delete, don't have anything to do with the site anymore, and that deleting them won't have any effect on how my site works.
I've tried finding orphaned files in Dreamweaver, but it lists a lot of files that I do actually need.
Here's one idea: Crawl the site and create a list of every file you can find, then check anything that's not on that list. Wikipedia has a list of crawlers including some open source ones.
Xenu's linksleuth is the easiest way I've found.
http://home.snafu.de/tilman/xenulink.html
After you do the scan you have the option to put in your FTP info. If you do so, it will also generate a list of files that are not accessible (orphans).
How would you qualify unnecessary? That's something you need to be sure of before beginning this. I guess one way to garbage collect your site is to delete files not being referenced by any other files.
The idea with the crawler #Brendan to get all files that actually are used is very nice.
Then you can start deleting files from your website and after that use a program to find any broken links in your website like Xenu or LinkTiger or then one you prefer.
You can connect with some ftp application, and delete files manual. This is the safest way, because scripts and programs don't know what is needed and what not...
This did not exist at the time this question was asked, but there is a Python script called weborphans designed for this purpose.
Here's a blog entry by the author with some more info: Finding orphaned files on websites

Resources