Each repository follows a repository format and a data store format.
SUBVERSION VERSION NUMBER | SCHEMA VERSION |
---|
r''' | |
The script uses regular expressions (regex) to perform replacements on a file. | |
The regex replacement is applied once by line. | |
The search pattern is built like this: | |
(designator)-(pin name)space((prefixes, optional)(component names)) | |
Example: | |
([A-Z]+[0-9]+)-([^ ]+) ((NC_|DNP_)?(2000UF|SS2040FL|DMP1046UFDB|TMP1075DSGR)) | |
^ ^ ^^ ^ match group 5 | |
^ ^ ^^ match group 4 | |
^ ^ ^ match group 3 |
import argparse | |
# command line options | |
# the help message shows the default values | |
argParser = argparse.ArgumentParser( \ | |
formatter_class=argparse.ArgumentDefaultsHelpFormatter, \ | |
description='''A beautiful description.''' \ | |
) | |
argParser.add_argument('client', help='Reference code of the target client. Must exist in the mapping dictionary.') # mandatory | |
argParser.add_argument('-r', '--recipes', help='JSON file containing the recipes for pins renaming. Must contain one section by client.', default='CLIENTS_Remap_Part-PinNames.json') |
pip install odoo-client-lib
odoo_conn.conf
(expected content described below)odoo_import_thread.py
(examples below)# https://pythonhosted.org/OdooRPC/ref_db.html#odoorpc.db.DB | |
import sys # in order to capture stdin | |
import os | |
import argparse | |
import odoorpc # pip install odoorpc | |
from datetime import datetime | |
argParser = argparse.ArgumentParser() |
# Pre-requisite: `pip install dnspython` | |
# Source: https://github.com/scottbrady91/Python-Email-Verification-Script | |
import re | |
import smtplib | |
import dns.resolver | |
# Address used for SMTP MAIL FROM command | |
fromAddress = '[email protected]' |
import socket | |
def get_ipaddress(network='wlan0'): | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
return socket.inet_ntoa(fcntl.ioctl( | |
s.fileno(), | |
0x8915, # SIOCGIFADDR | |
struct.pack('256s', network[:15]) | |
)[20:24]) |
# Source: https://ao.gl/how-to-split-a-subdirectory-to-a-new-git-repository-and-keep-the-history/ | |
git filter-branch --prune-empty --subdirectory-filter relative/path/to/subdirectory your_current_branch_name | |
git remote set-url origin https://github.com/subfolder/your_new_sub_repo.git | |
git push -u origin your_current_branch_name |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
Esc::² | |
²::Esc |