Giter Site home page Giter Site logo

kentoseth / h2vx.com Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microformats/h2vx.com

1.0 2.0 0.0 45 KB

H2VX microformats to vCard/iCalendar converter, test dev.h2vx.com for issues

Home Page: http://microformats.org/wiki/h2vx

ApacheConf 0.63% JavaScript 10.14% PHP 4.18% XSLT 81.29% HTML 2.24% CSS 1.53%

h2vx.com's Introduction

h2vx.com

H2VX microformats to vCard/iCalendar converter, test dev.h2vx.com for issues

Setting up locally

The instructions (below) assume that you are using a Debian/Ubuntu/*nix distro. Commands are Ubuntu-centric, but can be adjusted to the *nix of your choice.

  1. Install tasksel for LAMP-server setup:
sudo apt install tasksel
  1. Install LAMP-server via tasksel:
sudo tasksel

(starts tasksel)

Follow the rest of the instructions using the Ubuntu-tasksel link here

  1. Install missing php-packages (assuming php5 is installed):
sudo apt install php5-curl php5-xsl php5-tidy
  1. After you have downloaded/extracted the website, you can use the following command(s) to push the site to the Apache-server:
sudo cp -av ~/h2vx.com-master/* /var/www/html/
sudo chmod 755 -R /var/www  
# the chmod is normally required to overcome 403 or other permissions-issues
  1. Copy/Paste the following code into ~/vcf/sharing.js:
/* sharing.js

2009-10-26 created by Tantek Çelik http://tantek.com

NOTES:
This depends on functions defined in common.js
---------------------------------------------------- */

var base = document.location.href.substr(0, document.location.href.lastIndexOf('/vcf/') + 5);

function updatesharing() {
  var uri = uriclean(document.forms[0].uri.value);
  document.getElementById('vcardlink').value = base+uri;
  uri = htmlspecialchars(uri);
  document.getElementById('HTML').value ='<a type="text/directory" href="'+base+uri+'">Download vCard</a>';
}

document.forms[0].uri.onkeyup = updatesharing;
document.write('<fieldset><p><label class="term">URL <span class="info"><b>(</b>Use this link to directly retrieve vCards.<b>)</b></span></label> <input id="vcardlink" onclick="document.getElementById(\'vcardlink\').focus();document.getElementById(\'vcardlink\').select()" readonly="readonly" type="text" /></p><p><label class="term">HTML <span class="info"><b>(</b>Add this HTML to your web page to create a "Download vCard" link.<b>)</b></span></label> <input id="HTML" onclick="document.getElementById(\'HTML\').focus();document.getElementById(\'HTML\').select()" readonly="readonly" type="text" /></p></fieldset>');

updatesharing();  

Note. Adjusting the sharing/js is required to get the generator to render on your domain (eg. localhost/vcf )

Note2. Remember to copy/paste the sharing.js to var/www/html in case you make changes to the local copy.

Troubleshooting

  • Restart Apache server:
sudo service apache2 restart
  • View Apache Logs:
sudo cat /var/log/apache2/access.log
sudo cat /var/log/apache2/error.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.