Skip to content

Commit f5feaa2

Browse files
Add files via upload
1 parent 5624ba0 commit f5feaa2

File tree

7 files changed

+538
-0
lines changed

7 files changed

+538
-0
lines changed

Aura.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
from openpyxl import Workbook, load_workbook
2+
from openpyxl.styles import Font
3+
from openpyxl.utils import get_column_letter
4+
5+
# Load existing workbook
6+
file_path = "/mnt/data/Aura_Hub.xlsx"
7+
wb = load_workbook(file_path)
8+
9+
# Select Home sheet
10+
home = wb["Home"]
11+
12+
# Clear existing content before adding new structured layout
13+
for row in home["A1:D20"]:
14+
for cell in row:
15+
cell.value = None
16+
17+
# Title
18+
home["A1"] = "🌌 Aura Hub - Research Ecosystem"
19+
home["A1"].font = Font(size=16, bold=True)
20+
21+
# Section for navigation
22+
links = {
23+
"GitHub Repository": "https://web4application.github.io/Aura/",
24+
"Documentation": "https://github.com/web4application/Aura",
25+
"Experiment Logs": "#Logs!A1",
26+
"Data Sheets": "#Data!A1"
27+
}
28+
29+
row = 3
30+
for name, url in links.items():
31+
cell = home[f"A{row}"]
32+
cell.value = name
33+
cell.font = Font(size=12, color="0000FF", underline="single")
34+
home[f"A{row}"].hyperlink = url
35+
row += 2
36+
37+
# Adjust column width
38+
for col in range(1, 3):
39+
home.column_dimensions[get_column_letter(col)].width = 40
40+
41+
# Save updated workbook
42+
updated_path = "/mnt/data/Aura_Hub_with_links.xlsx"
43+
wb.save(updated_path)
44+
updated_path

Aura_Hub 2.ipynb

5.95 KB
Binary file not shown.

BizApp.xltm

Lines changed: 240 additions & 0 deletions
Large diffs are not rendered by default.

__init__.xlsl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import pandas as pd
2+
import os
3+
4+
def load_excel(file_path):
5+
# Normalize .xlsl to .xlsx
6+
if file_path.endswith(".xlsl"):
7+
fixed_path = file_path[:-1] + "x" # replace .xlsl with .xlsx
8+
if not os.path.exists(fixed_path):
9+
os.rename(file_path, fixed_path)
10+
file_path = fixed_path
11+
return pd.ExcelFile(file_path)
12+
13+
def save_excel(writer_path, dfs: dict):
14+
# dfs = {sheet_name: dataframe}
15+
if writer_path.endswith(".xlsl"):
16+
writer_path = writer_path[:-1] + "x" # save as .xlsx internally
17+
with pd.ExcelWriter(writer_path, engine="openpyxl") as writer:
18+
for sheet, df in dfs.items():
19+
df.to_excel(writer, sheet_name=sheet, index=False)

appxmanifest.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--suppress XmlUnusedNamespaceDeclaration -->
3+
<Package
4+
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
5+
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
6+
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
7+
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
8+
<!-- use single quotes to avoid double quotes escaping in the publisher value -->
9+
<Identity Name="${identityName}"
10+
ProcessorArchitecture="${arch}"
11+
Publisher='${publisher}'
12+
Version="${version}" />
13+
<Properties>
14+
<DisplayName>${displayName}</DisplayName>
15+
<PublisherDisplayName>${publisherDisplayName}</PublisherDisplayName>
16+
<Description>${description}</Description>
17+
<Logo>${logo}</Logo>
18+
</Properties>
19+
<Resources>
20+
${resourceLanguages}
21+
</Resources>
22+
<Dependencies>
23+
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="${minVersion}" MaxVersionTested="${maxVersionTested}" />
24+
</Dependencies>
25+
<Capabilities>
26+
<rescap:Capability Name="runFullTrust"/>
27+
</Capabilities>
28+
<Applications>
29+
<Application Id="${applicationId}" Executable="${executable}" EntryPoint="Windows.FullTrustApplication">
30+
<uap:VisualElements
31+
BackgroundColor="${backgroundColor}"
32+
DisplayName="${displayName}"
33+
Square150x150Logo="${square150x150Logo}"
34+
Square44x44Logo="${square44x44Logo}"
35+
Description="${description}">
36+
${lockScreen}
37+
${defaultTile}
38+
${splashScreen}
39+
</uap:VisualElements>
40+
${extensions}
41+
</Application>
42+
</Applications>
43+
</Package>

homepage.py

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# -*- coding: iso-8859-1 -*-
2+
"""
3+
MoinMoin - creates user homepage for existing accounts
4+
5+
@copyright: 2009 MoinMoin:ReimarBauer
6+
@license: GNU GPL, see COPYING for details.
7+
"""
8+
9+
from MoinMoin import user
10+
from MoinMoin.Page import Page
11+
from MoinMoin.PageEditor import PageEditor
12+
from MoinMoin.script import MoinScript
13+
from MoinMoin.mail.sendmail import encodeSpamSafeEmail
14+
15+
16+
class PluginScript(MoinScript):
17+
"""\
18+
Purpose:
19+
========
20+
This tool allows you to create user homepages via a command line interface.
21+
22+
Detailed Instructions:
23+
======================
24+
General syntax: moin [options] account homepage [homepage-options]
25+
26+
[options] usually should be:
27+
--config-dir=/path/to/my/cfg/ --wiki-url=http://wiki.example.org/
28+
29+
1. Required is one of the options --name, --group or --all-users.
30+
To create the homepage of one user use the --name argument. For adding homepages to a group of users
31+
give the --group page argument. Or with --all-users you create homepages for ALL users.
32+
2. To respect ACLs give the --user argument.
33+
3. Optionally you may want to use a template page by the --template_page argument.
34+
With e.g. #acl @ME@:read,write,delete,revert Default on the template page you can define
35+
acl rights for the user. @EMAIL@ becomes expanded to the users obfuscated mail address.
36+
"""
37+
38+
def __init__(self, argv, def_values):
39+
MoinScript.__init__(self, argv, def_values)
40+
41+
self.parser.add_option(
42+
"-u", "--user", dest="homepage_creator",
43+
help="User as whom the homepage creation operation will be performed as."
44+
)
45+
46+
self.parser.add_option(
47+
"-t", "--template_page", dest="template_page",
48+
help="The template page which should be used for the homepage creation"
49+
)
50+
51+
self.parser.add_option(
52+
"-n", "--name", dest="user_homepage",
53+
help="The name of the user the homepage should be created for."
54+
)
55+
56+
self.parser.add_option(
57+
"-g", "--group", dest="name_of_group_page",
58+
help="The name of the group page to select users for creating their homepages."
59+
)
60+
61+
self.parser.add_option(
62+
"-a", "--all-users", dest="all_users", action="store_true",
63+
help="The name of the group page to select users for creating their homepages."
64+
)
65+
66+
def write_homepage(self, account, homepage_text):
67+
# writes the homepage
68+
if account.exists() and not account.disabled and not Page(self.request, account.name).exists():
69+
userhomepage = PageEditor(self.request, account.name)
70+
try:
71+
userhomepage.saveText(homepage_text, 0)
72+
print "INFO homepage for %s created." % account.name
73+
except userhomepage.Unchanged:
74+
print "You did not change the page content, not saved!"
75+
except userhomepage.NoAdmin:
76+
print "You don't have enough rights to create the %s page" % account.name
77+
else:
78+
print "INFO homepage for %s already exists or account is disabled or user does not exist." % account.name
79+
80+
def mainloop(self):
81+
# we don't expect non-option arguments
82+
self.init_request()
83+
request = self.request
84+
# Checks for a template page and sets homepage_default_text
85+
if self.options.template_page and Page(self.request, self.options.template_page).exists():
86+
homepage_default_text = Page(self.request, self.options.template_page).get_raw_body()
87+
# replace is needed because substitution is done for request.user
88+
# see option --user
89+
homepage_default_text = homepage_default_text.replace('@ME@', "%(username)s")
90+
homepage_default_text = homepage_default_text.replace('@EMAIL@', "<<MailTo(%(obfuscated_mail)s)>>")
91+
else:
92+
homepage_default_text = '''#acl %(username)s:read,write,delete,revert Default
93+
#format wiki
94+
95+
== %(username)s ==
96+
97+
Email: <<MailTo(%(obfuscated_mail)s)>>
98+
## You can even more obfuscate your email address by adding more uppercase letters followed by a leading and trailing blank.
99+
100+
----
101+
CategoryHomepage
102+
'''
103+
# Check for user
104+
if self.options.homepage_creator:
105+
uid = user.getUserId(request, self.options.homepage_creator)
106+
request.user = user.User(request, uid)
107+
# Check for Group definition
108+
members = []
109+
if self.options.user_homepage:
110+
members = [self.options.user_homepage, ]
111+
elif self.options.name_of_group_page:
112+
members = request.groups.get(self.options.name_of_group_page, [])
113+
elif self.options.all_users:
114+
uids = user.getUserList(request)
115+
members = [user.User(request, uid).name for uid in uids]
116+
117+
if not members:
118+
print "No user selected!"
119+
return
120+
121+
# loop through members for creating homepages
122+
for name in members:
123+
uid = user.getUserId(request, name)
124+
account = user.User(request, uid)
125+
homepage_text = homepage_default_text % {
126+
"username": account.name,
127+
"obfuscated_mail": encodeSpamSafeEmail(account.email)
128+
}
129+
self.write_homepage(account, homepage_text)

karma.conf.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Karma configuration
2+
// Generated on Mon Oct 19 2015 01:12:15 GMT+0200 (CEST)
3+
var isTravis = process.env.TRAVIS || false;
4+
var browsers = isTravis ? ['Chrome_travis_ci'] : ['Chrome'];
5+
var singleRun = isTravis;
6+
7+
module.exports = function(config) {
8+
config.set({
9+
basePath: '',
10+
browsers: browsers,
11+
frameworks: ['jasmine-jquery', 'jasmine'],
12+
13+
files: [
14+
'node_modules/babel-polyfill/dist/polyfill.js',
15+
'test/index.js',
16+
{
17+
pattern: 'test/fixtures/**/*.html',
18+
watched: true,
19+
included: false,
20+
served: true
21+
}
22+
],
23+
24+
preprocessors: {
25+
'test/index.js': ['webpack']
26+
},
27+
28+
webpack: {
29+
devtool: 'inline-source-map',
30+
module: {
31+
loaders: [{
32+
test: /\.js?$/,
33+
exclude: [/bower_components/, /node_modules/],
34+
loader: 'babel'
35+
}, {
36+
test: /\.scss$/,
37+
loader: "css-loader?sourceMap!sass-loader"
38+
}]
39+
}
40+
},
41+
42+
plugins: [
43+
'karma-chrome-launcher',
44+
'karma-jasmine-jquery',
45+
'karma-jasmine',
46+
'karma-webpack'
47+
],
48+
49+
reporters: ['dots'],
50+
51+
customLaunchers: {
52+
Chrome_travis_ci: {
53+
base: 'Chrome',
54+
flags: ['--no-sandbox']
55+
}
56+
},
57+
58+
port: 9876,
59+
singleRun: singleRun,
60+
colors: true,
61+
logLevel: config.LOG_WARN
62+
})
63+
}

0 commit comments

Comments
 (0)