Zope Plone 3.1.2 - export all users with email addresses - plone

I have been running zope / plone site for about a year now - it seemed to be a pretty fast way of getting a CMS up and running and it's a great job for this - it's running 3.1.2 of plone. I am in now way a zope or plone expert (in fact the more I read about it - the less I know I know!) , but I am handy at python.
I have tried to export the users as xml - it fails with the unicode / id bug. I have tried export as a zexp file, but I can't actually find out how to read this file (I have tried import zope etc but I don't know what to do next !
I have found scripts that run listing all users, but these are for zope2 and, if I am honest, I wouldn't actually know how to install them anyway.
Can someone please either
1) tell me how to fix the id / unicode xml export bug? And please tell me in ways I can do directly on the site ?
or
2) show me how to read and zope zexp file and do something simple like put it into a dict ?
I didn't know so many people were going to sign up for using my site and now I wish to move the email list management to another system - hence the requirement for the export.
Thanks in advance,
Richard.

Another way of extracting the email addresses of the users:
Go to the root of the Plone site in the ZMI.
Add a "Script (Python)".
Come up with a nice id e.g. "export_email".
Click on "Add and edit".
Replace the code in the text field with the code listed below.
Don't forget to save your changes.
Go to the "test tab".
The code for the script:
for member in context.portal_membership.listMembers():
print member.getProperty('email')
return printed

OK - I'm going to put an answer here anyway, just in case anybody else ever gets stuck with this issue.
It's a cheat really, but I edited the /portal_skins/custom/prefs_users_overview and changed the line below from :20 to :2000 and then just did a simple user search, and then I HTML scraped the mailto: addresses.
b_size request/b_size | python:2000;
If anybody else finds this useful, let me know !

Related

VSCode : mvbasic extension on editing Unidata code with MV marks in code, ie CHAR(253), CHAR(254)

I have searched for a setting within the mvbasic extension within VSCode but I may have hit a dead end. I am new to using VSCode with the rocket mvbasic extension and still in the learning process, so please bear with me.
Our development for the most part has always been directly on the server using the editor within it to code and develop on a Unix/Aix platform with Unidata. Some of our code has array assignments with CHAR(253)/CHAR(254) characters within them. See the link to the image that shows how its done. Now I didn't do this code, the original software developer did this many many years ago and we just aren't going to go and change it all.
How code looks on actual server
The issue is when pulling the code to edit in VSCode, the extension is changing it, and I uploaded it back and didn't pay attention and it was implemented in our production incorrectly, which created a few bugs.
ALIST="H�V�P�R�M�D"
How code looks in VSCode
How code looks after uploaded back to server from VSCode
Easy to fix, no biggie, but now to my question.
Does anyone have this issue, or has a direction to point me into that maybe I need to create a setting to keep the characters in the correct ASCII format so that this doesn't happen again by mistake?
VSCode defaults to the sane choice for character encoding in 2022: utf-8, but sometimes you have to deal with legacy stuff.
https://code.visualstudio.com/docs/editor/codebasics#_file-encoding-support
If you click on the UTF-8 in the bottom right corner you can choose "Reopen with Encoding":
After that, you can select a different encoding. I chose DOS (CP437) at a guess and literal MV characters are displayed as superscript 2 (²), and for me I can save to the server and confirm those characters remain as #VM after a round trip (though for my terminal emulator they appear as } which is useful).
You can edit preferences and set "files.encoding": "cp437". One other thing that can be helpful if your programs don't have a standard extension (like .bas) as most don't is to set the default mode to basic so most of what you're editing will identify as MVbasic, and you can do a quick CTRL-K M to switch to any other modes if you're just pasting in something else like SQL.
Some useful links - the Rocket forums are helpful and the folks there are always super nice
https://community.rocketsoftware.com/forums/multivalue?CommunityKey=521bce2e-71d5-4d32-b560-dfa95e950eb5
The MV Extensions Community extension is a good group and always has been helpful when I've had issues. I've made some small contributions - they're very open. I prefer this extension, but honestly haven't done a deep comparison.
https://github.com/mvextensions

Prevent Atom Editor from auto creating files

at the moment I try to experiment a little bit with Atom for writing an API documentation with RAML. Everything works fine but one damn thing:
Everytime I type some file paths (e.g. !include schemas/file.schema Atom auto creates the file when I'm not quick enough with typing. So, in some cases I have a hole bunch of file-zombies in my schema folder. That's kind of annoying.
My setup is standard Atom on MacBook, with api-workbench plugin, which includes linter as well. I already had a look at all those settings concerning auto completion - nothing found there. Also, Google doesn't show any hints. Any Tips?
Best regards,
Chris
It looks like this is a defect in the api-workbench package:
Api workbench creates new schemas, while i type their paths. For example below, i can see two-three files created while i type full name:
E.g:
schemas:
- myschema: !include schemas/myschema.json
Will create following files:
schemas/my
schemas/mysche
schemas/myschema
schemas/myschemas.json - this file is existing, i've created it before. all other files are redudant and i have to delete them.
Bug is not reproduced with examples, which i can also include in my document. Having issues while edition RAML 0.8 files.
If you want to help the package maintainers fix the defect, can I suggest you put together a minimal but complete example that reproduces the issue, this will make it easier for them to identify and resolve the issue.

Anyone know how to set Notepad++ as default text editor for SAS, Stata and R?

Anyone know how to set Notepad++ as default text editor for SAS, Stata and R?
I'm having the hardest time finding anything online (particularly for SAS). Looking for ability to run code from Notepad++ as well as setup color coding.
Thanks.
Why not just go the GUI route: right click, e.g., any foo.R file and select "Open with...", then pick Np++ and click the "always open this file type.." button. Rinse, lather, repeat.
BTW, for R, if you don't already have it, get "NppToR" , a little app which lets you execute code directly from the Npp window.
On windows you can either:
manually edit the keys for the file type to set the value of HKEY_CLASSES_ROOT\FILE_TYPE\shell\edit\command where FILE_TYPE is the appropriate one for each of the files extensions you wish to change this is quite hard work or
you can use a program that does it for you such as the free Default Programs Editor
In either case the first thing to do is to back up the registry.
I would seriously suggest looking into using one of the many, some free IDEs as they will automatically include the run from edit environment, syntax highlighting, code completion and, in many cases, debugging as well.
Notepad++ is my favorite editor and I was in the same shoes as you are now.
I am assuming that you are in Windows (Notepad ++ doesn't exist in Mac, saddest thing for me)
Please follow the steps mentioned in the below webpage and do as the author says.
http://hafniumcity.com/notepad_color.php
Now for in-line editing , it may be not be the best choice for SAS. Although I haven't tried it much so not a good person to comment on it.

os x custom dictionary or custom lookup function

In Lion and Mountain Lion you can double-tap-3-fingers to look up word from dictionary. This gesture is so quick, clean and nice way to search for words, but it doens't support custom translations.
Eg. it supports japanese-english translation, but I would need finnish-english translation. Is there a way to add such dictionary. Or write custom function to lookup. Function could also use google translation api, but I don't know how to implement it.
Thanks in advance!
I'm also looking into this. I think it's theoretically possible to create a new OSX dictionary that calls Google Translate, but I'm not sure if anyone's done it.
Here's some info on creating dictionaries, and here's an Alfred plugin (plus shell script) that connects to Google Translate. I'll see what I can do with them.
Download the dictonary you want: finnish-english
To Install:
Unzip the file you downloaded. You will find that it contains a single file with the .dictionary extension. In typical Apple style, this is really a directory in disguise. Don't worry about it.
To install on your Mac, copy the .dictionary file to /Library/Dictionaries. You may need to supply an administrator password to do this.
If Dictionary.app is running, close it down and restart it.
Go into Dictionary.app's Preferences and make sure your new dictionary is checked.
More dictonaries: here
Want more? Downlaod DictUnifier and convert startDicts to Dictonary.app format. DictUnifiert automatically loads the dictionary to Dictonary.app
Enjoy!!!

Drupal modify translation of error message

i have an English Drupal installation but the frontend needs to be dutch. Now i asked a few weeks ago if it's possible to install a different backend and frontend language but this seems to be difficult. Now i only have one small message that isn't translated yet in the frontend and this is the required field error message (... field is required). How can i edit this translations? The may be an easy not so clean solution.
If you want an english backend and Dutch frontend you should use admin language that should fix that problem for you. In regards to translating the field required, that should be simple enough. It use a placeholder, so you might need to look for something like
#field is required
Drupal use this system when it use the same string with a dynamic value so you only need to translate it once and not for every combo.
thanks, for the admin_language module, but i found how to do this simple translation. You can override the translations using 'String overrides' ins settings.php

Resources